﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Chess
{
    public class WhitePlayer : Player
    {
        public WhitePlayer()
        {
            Piece piece;
            this.isColor = Player.Color.WHITE;
            this.filePiece.Add(this.King = (new Piece(Piece.Name.King, this, 4, 0)));
            this.Queen = (new Piece(Piece.Name.Queen, this, 3, 0));
            this.filePiece.Add(this.Queen);

            this.KingPawn = new Piece(Piece.Name.Pawn, this, 4, 1);
            this.filePiece.Add(this.KingPawn);
            this.QueenPawn = new Piece(Piece.Name.Pawn, this, 3, 1);
            this.filePiece.Add(this.QueenPawn);

            this.KingRook = (new Piece(Piece.Name.Rook, this, 7, 0));
            this.filePiece.Add(this.KingRook);
            this.QueenRook = (new Piece(Piece.Name.Rook, this, 0, 0));
            this.filePiece.Add(this.QueenRook);

            this.KingKnight = (new Piece(Piece.Name.Knight, this, 6, 0));
            this.filePiece.Add(this.KingKnight);
            this.QueenKnight = (new Piece(Piece.Name.Knight, this, 1, 0));
            this.filePiece.Add(this.QueenKnight);

            this.KingBishop = (new Piece(Piece.Name.Bishop, this, 5, 0));
            this.filePiece.Add(this.KingBishop);
            this.QueenBishop = (new Piece(Piece.Name.Bishop, this, 2, 0));
            this.filePiece.Add(this.QueenBishop);                     

            piece = new Piece(Piece.Name.Pawn,this,0, 1);
            this.filePiece.Add(piece);
            piece = new Piece(Piece.Name.Pawn,this,1,1);
            this.filePiece.Add(piece);
            piece = new Piece(Piece.Name.Pawn,this,2,1);
            this.filePiece.Add(piece);
            piece = new Piece(Piece.Name.Pawn,this,5,1);
            this.filePiece.Add(piece);
            piece = new Piece(Piece.Name.Pawn,this,6,1);
            this.filePiece.Add(piece);
            piece = new Piece(Piece.Name.Pawn,this,7,1);
            this.filePiece.Add(piece);
        }

        public override int PawnForwardOffset
        {
            get { return 16; }
        }

        public override int PawnAttackLeftOffset
        {
            get { return 15; }
        }

        public override int PawnAttackRightOffset
        {
            get { return 17; }
        }
    }
}
